{strip}
{ext->countArray array=$groups_list assign="groups_count"}
{*debug var=$groups_list*}
<form name="child_list" action="index.php" enctype="multipart/form-data" method="post">
<input name="admin" type="hidden" value="1">
<input name="module" type="hidden" value="realstate">
<input name="mod" type="hidden" value="product">
<input name="act" type="hidden" value="">
<input name="parent" type="hidden" value="">
<input name="referer" type="hidden" value="{ext->get_referer}">
<script language="javascript" type="text/javascript">	
	var tpl_group_filter='{$smarty.get.tpl_group_filter}';
	var group_id='{$smarty.get.group_id}';
	var referer='{ext->get_referer}';
	{literal}
	function f1(nId,nParent){
		window.location.href='index.php?admin=1&tpl_realstate_module=product&product_id='+nId+'&group_id='+nParent+'&tpl_group_filter='+tpl_group_filter;
	}
	function f2(nId){
		window.location.href='index.php?admin=1&module=realstate&mod=product&act=up&group_id='+group_id+'&product_id='+nId+'&referer='+referer;
	}
	function f3(nId){
		window.location.href='index.php?admin=1&module=realstate&mod=product&act=down&group_id='+group_id+'&product_id='+nId+'&referer='+referer;
	}
	function f4 (nId){
		openCenteredOnOpenerWindow('index.php?admin=1&group_id='+nId+'&popup=52&type=realstate_product','group_modif',400,300,1,1)
	}
	function f5 (nId, nHide){
		window.location.href='index.php?admin=1&mod=product&act=hide&hide='+nHide+'&product_id='+nId+'&module=realstate'+'&referer='+referer;
	}
	function f6 (nId){
		openCenteredOnOpenerWindow('index.php?admin=1&group_id='+nId+'&popup=53','group_modif',400,300,1,0)
	}
</script>
<style type="text/css">
	.this .tb {
		width:100%; background:#F4F6F7;
	}
		.this .tb td {
			border-top:1px solid white; border-bottom:1px solid #D6DBDE; height:22px
		}
			.this .tb td.a{
				border-right:1px solid #D6DBDE; width:60px; text-align:center
			}
				.this .tb td.a img{
					cursor:pointer; margin:0 2px;
				}			
			.this .tb td.b{
				border-right:1px solid #D6DBDE; width:70px; text-align:center
			}
			.this .tb td.c{
				padding:0px 0px 0px 10px; border-right:1px solid #D6DBDE; 
			}
			.this .tb td.d{
				 border-right:1px solid #D6DBDE; padding:0px 10px 0px 10px; width:100px; white-space:nowrap
			}
			.this .tb td.e{
				width:50px; text-align:center; border-right:1px solid #D6DBDE; background:url(_tvs_system_core_/design/img/admin/_status_1.gif) no-repeat center;  cursor:pointer
			}				
			.this .tb td.f{
				width:50px; text-align:center; background:url(_tvs_system_core_/design/img/admin/_icon_page_properties.gif) no-repeat center; cursor:pointer
			}
			.this .tb td.h{
				background:url(_tvs_system_core_/design/img/admin/_status_0.gif) no-repeat center;
			}
			
			
</style>
{/literal}
<div class="this">
	<div style="border-bottom:1px solid #25404E; height:12px"></div>
{if $groups_count > 1 && $groups_list.pages}
	<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border-bottom:1px solid #D6DBDE">
		<tr>		
			<td  height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="70">{t t='Žymėjimas'}</td>	
			<td height="20" style="font-size:9px; color:#4C4C4C; text-align:center; border-right:1px solid #D6DBDE" width="60">{t t='Pozicija'}</td>	
			<td style="font-size:9px; color:#4C4C4C; text-align:left; padding:0px 0px 0px 10px">
				<table width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td>{t t='Pavadinimas'}</td>
						<td width="10"><a href="index.php?admin=1&tpl_realstate_module=goods&group_id={$smarty.get.group_id}&tpl_group_filter={$smarty.get.tpl_group_filter}&soft_by_name=down{if $smarty.get.soft_by_status}&soft_by_status={$smarty.get.soft_by_status}{/if}"><img src="_tvs_system_core_/design/img/admin/pos_down{if $smarty.get.soft_by_name=='down'}_dark{/if}.gif" width="13" height="7"></a></td>
						<td width="10" style="padding-right:5px;"><a href="index.php?admin=1&tpl_realstate_module=goods&group_id={$smarty.get.group_id}&tpl_group_filter={$smarty.get.tpl_group_filter}&soft_by_name=up{if $smarty.get.soft_by_status}&soft_by_status={$smarty.get.soft_by_status}{/if}"><img src="_tvs_system_core_/design/img/admin/pos_up{if $smarty.get.soft_by_name=='up'}_dark{/if}.gif" width="13" height="7"></a></td>
					</tr>
				</table>
			</td>			
		</tr>
	</table>
	<table cellpadding="0" cellspacing="0" class="tb">			
	{foreach from=$groups_list key="key" item="el"}
		{if $key != 'pages'}
			<tr>				
				<td class="b"><input name="ids[{$el.id}]" value="{$el.id}" type="checkbox"></td>	
				<td class="a"><img src="_tvs_system_core_/design/img/admin/pos_up.gif" onClick="f2({$el.id})"><img src="_tvs_system_core_/design/img/admin/pos_down.gif" onClick="f3({$el.id})"></td>		
				<td class="c"><a href="#" onClick="f1({$el.id},{$el.parent})">{$el.name}</a></td>
				{ext->class_function class="realstate" module="off" assign="is_module"}{if $is_module == 1}				
				{ext->class_function class="realstate" func="get_assigned_discount" type='realstate_product' parent=$el.id assign="off"}
				<td class="d" {if $off}title="{$off.name} - {$off.desc}: {$off.num}%"{/if}><a onClick="f4({$el.id}); return false" href="#">{t t='Nuolaida'}</a>{if $off} ({$off.num}%){/if}</td>
				{/if}
				<td class="e {if $el.hide==1}h{/if}" onClick="f5({$el.id},{if $el.hide==1}0{else}1{/if})">&nbsp;</td>
				<td class="f" onClick="f6({$el.id}); return false">&nbsp;</td>				
			</tr>
		{/if}
	{/foreach}			
		</table>	
{else}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="50" bgcolor="#FFFFFF" align="center" style="padding:15px">{t t='Nėra nei vieno produkto'}</td>		
	</tr>
</table>
{/if}
	<div style="border-top:1px solid #25404E; height:12px"></div>
</div>
</form>
{/strip}
